<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
  if(session.getAttribute("USER_LOGIN")==null){
	  //获得cookie保存的用户名
%>
<p style="color:red">
	${msg}
</p>
<form method="post" action="<%=request.getContextPath()%>/adminlogin">
 <input name="userName" placeholder="用户名" value=""/>
 <input name="userPass" type="password" placeholder="用户名"/>
 <input type="submit"/>
</form>
<%}else{ %>
  <h1>欢迎<%=session.getAttribute("USER_LOGIN")%></h1>
  <a href="welcome.jsp">去首页</a>
<%} %>
</body>
</html>